﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SharingCenter.Web.Classes;

namespace SharingCenter.Web.Misc
{
    public partial class Default : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Request.QueryString.AllKeys.Contains("q"))
            {
                RedirectToDefaultPage();
            }
            else
            {
                //SiteConfigSection section = (SiteConfigSection)Enum.Parse(typeof(SiteConfigSection), Request.QueryString["s"]);
                SiteConfigSection section = SiteConfigSection.Misc;
                this.ltrTitle.Text = SiteConfig.ReadSetting(section, Request.QueryString["q"] + "Title");
                this.ltrContent.Text = SiteConfig.ReadSetting(section, Request.QueryString["q"]);
            }
        }
    }
}